import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/components/Login'
import Register from '@/components/Register'
import Front from '@/components/Front'
import Home from '@/components/front/Home'  
import BlogDetail from '@/components/front/BlogDetail'
Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/front' },
  { path: '/login', name: 'Login', component: Login },
  { path: '/register', name: 'Register', component: Register },
  { 
    path: '/front',
    name: 'Front', 
    component: Front,  
    children:[
      { path: '', name: 'Home', component: Home },
      { path: 'home', name: 'FHome', component: Home },
      { path: 'blogDetail', name: 'BlogDetail', component: BlogDetail},
      
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router